package com.xayy.health.mgt.mapper;

import cn.kawins.mybatis.BaseMapper;
import com.xayy.health.core.config.datasource.DatasourceSelector;
import com.xayy.health.mgt.model.DiagnoseMultipleParametersData;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author zhangxa
 */
public interface DiagnoseMultipleParametersDataMapper extends BaseMapper<DiagnoseMultipleParametersData> {

    /**
     * 门限值数据插入
     *
     * @param list 门限数据
     */
    @DatasourceSelector(sourceName = "clickhouse")
    void insertThresholdJudgmentData(@Param("list") List<DiagnoseMultipleParametersData> list);


    /**
     * 查询多参数数据
     *
     * @param taskChildId 子任务id
     * @return List<DiagnoseMultipleParametersData>
     */
    @DatasourceSelector(sourceName = "clickhouse")
    List<DiagnoseMultipleParametersData> selectDataList(Long taskChildId);

    /**
     * 事后诊断多参数插入数据
     *
     * @param diagnoseMultipleParametersDataList 事后诊断多参数数据
     */
    @DatasourceSelector(sourceName = "clickhouse")
    void insertDiagnoseMultipleParametersData(@Param("list") List<DiagnoseMultipleParametersData> diagnoseMultipleParametersDataList);

    /**
     * 事后诊断多参数查询数据
     *
     * @param taskChildId 子任务id
     * @return List<DiagnoseMultipleParametersData>
     */
    @DatasourceSelector(sourceName = "clickhouse")
    List<DiagnoseMultipleParametersData> selectDiagnoseMultipleParametersDataList(Long taskChildId);

    /**
     * 删除多参数数据
     *
     * @param taskChildIds 子任务id
     */
    @DatasourceSelector(sourceName = "clickhouse")
    void deleteDiagnoseMultipleParametersData(@Param("taskChildIds") List<Long> taskChildIds);
}
